﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using ProgrammingSchool.Infrastructure.Constants;

namespace ProgrammingSchool.Models.Shared
{
    public class FeedBackModel
    {
        public FeedBackModel()
        {
            Name = "Your name";
            Phone = "Your phone";
            Email = "E-mail";
            Message = "Message";
        }

        [Required(ErrorMessage = ModelConstants.NameRequered)]
        public string Name { get; set; }

        [Required(ErrorMessage = ModelConstants.PhoneRequered)]
        public string Phone { get; set; }

        [Required(ErrorMessage = ModelConstants.EmailRequiredMessage)]
        [RegularExpression(ModelConstants.EmailRegExpValidation, ErrorMessage = ModelConstants.EmailNotValid)]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        [Required(ErrorMessage = ModelConstants.MessageRequered)]
        public string Message { get; set; }
    }
}